﻿using DataAccessObjectLayer;
using ModelLayer;

namespace ControllerLayer
{
    public class CityCtr
    {
        /// <summary>
        /// Gets the city from postal code.
        /// </summary>
        /// <param name="postalCode">The postal code.</param>
        /// <returns>City.</returns>
        public City GetCityFromPostalCode(int postalCode)
        {
            DBCity dbCity = new DBCity();
            City city = dbCity.GetCityFromPostalCode(postalCode);
            return city;
        }

        /// <summary>
        /// Gets the city from city name.
        /// </summary>
        /// <param name="cityName">Name of the city.</param>
        /// <returns>City.</returns>
        public City GetCityFromName(string cityName)
        {
            DBCity dbCity = new DBCity();

            City city = dbCity.GetCityFromName(cityName);
            return city;
        }
    }
}